<style>
    #change-pay.bg {
        position: fixed;
        top: 0;
        /* left: 0; */
        width: 100vw;
        height: 100vh;
        max-width: 750px;
        min-width: 320px;
        background: rgba(0, 0, 0, 0.5);
        display: flex;
        align-items: center;
        justify-content: center;
    }

    #change-pay .wrap {
        font-size: 14px;
        background: #fff;
        width: 80%;
        border-radius: 5px;
        overflow: hidden;
        padding-top: 10px;
        box-shadow: 0 3px 10px 2px rgba(0, 0, 0, 0.5);
    }

    #change-pay .wrap .list {

        margin: 0 10px;
        border-bottom: 1px solid #eee;
    }

    #change-pay .wrap .list input {
        outline: none;
        width: 100%;
        line-height: 45px;
    }

    #change-pay .btn-wrap {
        display: flex;
    }

    #change-pay .btn {
        width: 50%;
        text-align: center;
        color: #fff;
        line-height: 45px;
        outline: none;
    }

    #change-pay .cancel {
        background: #ddd;
    }

    #change-pay .submit {
        background: #673AB7;
    }
</style>

<div class="bg" id="change-pay">
    <div class="wrap">
        <ul>
            <li class="list name">
                <input type="text" placeholder="请输入您的支付宝名字">
            </li>
            <li class="list count">
                <input type="text" placeholder="请输入您的支付宝账号">
            </li>
        </ul>
        <div class="btn-wrap">
            <button class="btn cancel" onclick="closeMoneyFrm()">取消</button>
            <button class="btn submit" onclick="submit()">确认</button>
        </div>
    </div>
</div>
<script>
    var name = view.ffInfo.zhifuname;
    var count = view.ffInfo.zhifucount;
    name = name == 'null' ? '' : name;
    count = count == 'null' ? '' : count;
    $('.name input').val(name || '');
    $('.count input').val(count || '');
    judgeLogin()
    // 提交
    function submit() {
        var name = $.trim($('.name input').val());
        var count = $.trim($('.count input').val());
        if (!name) {
            _msg('支付宝名称不能为空');
            return;
        }
        if (!count) {
            _msg('支付宝账号不能为空');
            return;
        }
        _ajax('c=Withdraw&a=bangZ', function (ret) {
            if (ret && ret.code == 200) {
                getMyMoney();
                _msg('设置成功');
                setTimeout(function () {
                    closeMoneyFrm()
                }, 800)
                location.reload();
            } else {
                _msg('设置失败');
            }
        }, {
            userid: myuserid,
            zhifuname: name,
            zhifucount: count,
            urlType: 'get'
        })
    }
</script>